package com.rzcode.coinex.kernel.dao.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;

/**
 * 系统权限
 *
 * @author Bridge.Xu
 * @date 2020年12月18日
 */

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "admin_permission")
public class SysPermission {

    @ApiModelProperty(value = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 标题
     */
    @ApiModelProperty(value = "标题")
    private String title;

    /**
     * 描述
     */
    @ApiModelProperty(value = "描述")
    private String description;

    /**
     * 为0表示是菜单
     */
    @ApiModelProperty(value = "")
    private Long parentId=0L;

    /**
     * 排序
     */
    @ApiModelProperty(value = "排序")
    private Integer sort = 0;

    /**
     * 名称
     */
    @ApiModelProperty(value = "名称")
    private String name;

    @JsonIgnore
    private List<SysRole> roles ;
}
